package site.lanmushan.framework.datascope.autoconfiguration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Import;
import site.lanmushan.framework.datascope.interceptor.autoupdate.InsertAutoUpdateInterceptor;
import site.lanmushan.framework.datascope.interceptor.autoupdate.UpdateAutoUpdateInterceptor;
import site.lanmushan.framework.datascope.interceptor.datascope.DeleteDataScopeInterceptor;
import site.lanmushan.framework.datascope.interceptor.datascope.SelectDataScopeInterceptor;
import site.lanmushan.framework.datascope.interceptor.datascope.UpdateDataScopeInterceptor;
import site.lanmushan.framework.datascope.properties.AutoUpdateProperties;
import site.lanmushan.framework.datascope.properties.DataScopeProperties;

import javax.annotation.PostConstruct;

@Import({InsertAutoUpdateInterceptor.class,
        UpdateAutoUpdateInterceptor.class,
        AutoUpdateProperties.class})
@ConditionalOnProperty(prefix = "slash.data-control.auto-update", name = "enabled", havingValue = "true")
public class AutoUpdateAutoConfiguration {
    @Autowired
    AutoUpdateProperties autoUpdateProperties;
    @PostConstruct
    public void init(){
        System.out.println(autoUpdateProperties);
    }
}
